package com.jazz.util;

import java.io.File;
import java.util.LinkedList;
import java.util.List;

public class FileUtil {

	public static void main(String[] args) {
		listFile(new File("C:\\Oracle"));
		for (File file : list) {
			System.out.println(file.getPath());
		}
	}

	private static List<File> list = new LinkedList<File>();

	public static void listFile(File file) {
		List<File> list = new LinkedList<File>();
		if (file.isDirectory()) {
			for (File subFile : file.listFiles()) {
				listFile(subFile);
				list.add(subFile);
			}
		} else {
			list.add(file);
		}
	}
}
